﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<div class="commentboards">
{% if board %}
  <div class="board" id="{{board.id}}" >
    <div class="description">{{board.description}}</div>
  {% for comment in comments %}
    <div class="comment" id="{{comment.id}}" >
    {% if comment.author %}
      <div class="author" id="{{comment.author.id}}" >
        <div class="username">{{comment.author.profile.name}}</div>
        <div class="email">{{comment.author.email}}</div>
        <div class="photo">{{comment.author.profile.photo.url}}</div>
        <div class="user_link">/accounts/profile/?uid={{comment.author.id}}</div>
      </div>
    {% else %}
      <div class="author" id="">
        <div class="username">匿名用户</div>
        <div class="email"></div>
        <div class="photo">/static/photos/default.jpg</div>
        <div class="user_link"></div>
      </div>
    {% endif %}
      <div class="comment_date">{{comment.comment_date}}</div>
      <div class="content">
          {{comment.content|linebreaks}}
      </div>
    </div>
  {% endfor %}
  </div>
{% endif %}
</div>
